﻿using FitNesseRunner.Model;

namespace FitNesseRunner
{
	class ImportTableHandler : RegularTableHandler
	{
		private readonly IContext _context;

		public ImportTableHandler(IContext context)
			: base("import")
		{
			_context = context;
		}

		public override void Handle(ITable table)
		{
			var importTable = new ImportTable(table.Cells);
			importTable.ExecuteAll(_context);
		}

		public string TableName
		{
			get { return "import"; }
		}
	}
}
